fix xol test to be compatible with msvc runtime.
authortsteven4 <tsteven4@gmail.com>
Sat, 28 Apr 2018 19:15:15 +0000 (13:15 -0600)
committertsteven4 <tsteven4@gmail.com>
Sat, 28 Apr 2018 19:15:15 +0000 (13:15 -0600)
reference/nonexistent_alternate.err [new file with mode: 0644]
testo.d/xol.test

diff --git a/reference/nonexistent_alternate.err b/reference/nonexistent_alternate.err
new file mode 100644 (file)
index 0000000..1867d15
--- /dev/null
@@ -0,0 +1 @@
+Cannot open './reference/doesnotexist' for read.  Error was 'The system cannot find the file specified'.
index b57aee7d422a112068eddf8d8fcc87e03eda8a3d..b4135a89936aa70647fa538cb25a0066f10f1297 100644 (file)
@@ -18,7 +18,8 @@ ${PNAME} -i xol -f ${REFERENCE}/doesnotexist -o gpx -F ${TMPDIR}/xol-sample_si.g
 # check error message is what we expected
 # Note that the reference file nonexistent.err includes the file path,
 # so this will fail when starting from a directory other than gpsbabel.
-compare ${REFERENCE}/nonexistent.err ${TMPDIR}/nonexistent.err
+# the message can vary depending on the c runtime, .i.e. msvc and gcc are slightly different.
+compare_with_alternate ${REFERENCE}/nonexistent.err ${REFERENCE}/nonexistent_alternate.err ${TMPDIR}/nonexistent.err
 
 
 gpsbabel -i gpx -f ${REFERENCE}/xol-sample.gpx -o xol -F ${TMPDIR}/xol-sample-gpx.xol